<?php
class ObjectFinder
{
    private static $_arr = array();

    private function has($resourceName)
	{
		return isset(self::$_arr[$resourceName]);
	}
	
	public static function get($resourceName)
	{
		if (false == self::has($resourceName))
		{
            $res = new $resourceName;
            self::$_arr[$resourceName] = $res;
		}
        else
        {
            $res = self::$_arr[$resourceName];
        }
		return $res;
	}
}
